package com.hhl.controller;
 
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.hhl.mq.DemoRabbitMqSender;
 
/**
 * 测试Rabbit MQ
 */
@RestController
@RequestMapping(value="/rabbitmq")
public class DemoRabbitMqController {
 
	@Autowired
	private DemoRabbitMqSender demoRabbitMqSender;
	
	/**
	 * 发送测试消息队列
	 */
    @RequestMapping(value = "/addRabbitMq", method = RequestMethod.GET)
	public @ResponseBody String addEntity(HttpSession httpSession) {
		demoRabbitMqSender.send("123123123");
		return "发送成功";
	}
	
}
